Fast high precision matching method

ABSTRACT

An initial search method uses the input image and the template to create an initial search result output. A high precision match uses the initial search result, the input image, and the template to create a high precision match result output. The high precision match method estimates high precision parameters by image interpolation and interpolation parameter optimization. The method also performs robust matching by limiting pixel contribution or pixel weighting. An invariant high precision match method estimates subpixel position and subsampling scale and rotation parameters by image interpolation and interpolation parameter optimization on the log-converted radial-angular transformation domain.

TECHNICAL FIELD

This invention relates to a method for fast high precision matching.

BACKGROUND OF THE INVENTION

Pattern search is a simple yet powerful machine vision tool. Given a template pattern and an image, its objective is to find all instances of the patterns in the image. It involves two steps, a search step and a matching step. The search step places the pattern at all valid poses (locations, rotation angles, sizes) of the image being searched. The matching step determines the goodness of the match between the pattern at a given pose and the subset of the image corresponding to the pose. For advanced applications, it is desirable that the matching step produces high precision (that is, subpixel position, subsampling scale and rotation) results.

Normalized correlation method (Manickam, Swami, Roth, Scott D., Bushman, Thomas, “Intelligent and Optimal Normalized correlation for High-Speed Pattern Matching”, NEPCON WEST 2000, February 2000) of fixed rotation and scale has been widely used as the matching method in many machine vision applications. The match score of normalized correlation is largely independent of linear variations in object shading caused by reflectivity or illumination variations.

A rotation and scale invariant pattern matching method was disclosed (Rotation and Scale Invariant Pattern Matching Method, U.S. Pat. No. 6,640,008) that generates a polar coordinate representation of the pattern template image that allows for fast linear search of scale along the radius axis and rotation along the angular axis. A fast regular shaped pattern search method was disclosed (Fast Regular Shaped Pattern Searching, U.S. patent application Ser. No. 10/255,016) that performs fast pattern matching with flexible projection kernels to construct regular-shaped patterns using an accumulation method. A fast invariant searching method was disclosed (Fast Invariant Pattern Search, U.S. patent application Ser. No. 10/302,466). It generates rotation and scale invariant profiles for fast invariant search using the fast regular shaped pattern construction method. In addition, a fast pattern searching method was disclosed (Fast Pattern Searching, U.S. patent application Ser. No. 10/283,380) that performs fast scale and aspect ratio invariant search.

The above prior art approaches are not designed for highly precise sub-pixel and sub-sampling matching. They return the discrete pixel position that yields the best match and the coarse rotation and scale estimate. A surface fitting approach (Gleason, S. S., M. A. Hunt, and W. B. Jatko, “Subpixel Measurement of Image Features Based on Paraboloid Surface fit”, SPEE Vol. 1386. Machine Vision Systems Integration in Industry, 1990) is attempted for subpixel matching. This approach fits the surface of the template matching scores (such as normalized correlation values) and estimates the maximum position from the surface for subpixel matching results. The fitting method suffers from the underlying nonlinear matching functions whose scores cannot be well characterized by the fitting surfaces. This, therefore, could yield misleading subpixel (for shift) or subsampling (for rotation and/or scale) matching results. It is reported that the error of the template matching score fitting based method is about 13% (Frischchlz Robert W. and Spinnler, Klaus P. “Class of algorithms for real-time subpixel registration” Proc. SPIE Vol. 1989, p. 50-59, Computer Vision for Industry, Donald W. Braggins; Ed).

A more accurate approach is to perform subpixel and subsampling interpolation in the image domain. Then, template matching is performed on the interpolated higher resolution image. This could yield more accurate results than performing interpolation on the matching score surface. Depending on the interpolation method, system noise and the number of bits per pixel used to quantized the data, it is expected that a midrange error of 0.01 to 0.05 pixel could be achieved using this method (Frischchlz Robert W. and Spinnler, Klaus P. “Class of algorithms for real-time subpixel registration” Proc. SPIE Vol. 1989, p. 50-59, Computer Vision for Industry, Donald W. Braggins; Ed). However, interpolation on the image domain for high precision matching requires large data volume and matching computation, which is too expensive for deployment in practical applications.

A prior art approach (“Golden template comparison for rotated and/or scaled images” U.S. Pat. No. 5,850,466) stores, in an array, a varied plurality of golden template images, each golden template image being characterized by a different combination of rotation and/or scale and/or sub-pixel translation. The array is indexed by the respective quantized rotation and/or quantized scale and/or sub-pixel translation of each version of the golden template image. This approach still requires a large number of template storage and computational cost for matching at high precision. So it is still impractical.

OBJECTS AND ADVANTAGES

This invention provides a fast method for high precision matching with the equivalent subpixel and subsampling interpolation in the image or template domain without actual performing the subpixel interpolation and/or subsampling. It achieves the high precision through sampling parameter optimization. Therefore, very fine sampling precision can be accomplished without the difficulty of high resolution image/template storage and expensive computation for actual matching at high resolution.

This invention includes a robust high precision matching method that allows the matching of noisy or imperfect data by limiting the contribution from each pixel and/or weighting the pixels by their significance/reliability, etc. The speed advantage is applicable to the robust matching methods of this invention.

This invention is generalized to include the high precision scale and rotation invariant matching through parameter optimization on log-converted radial-angular coordinate. This invention can be easily generalized to three-dimensional or higher dimensional invariant high precision pattern search and can achieve even greater speed advantage comparing to the prior art methods. Therefore, it can be used in applications such as 3D medical imaging, dynamic medical imaging, confocal microscopy, live cell assays in drug discovery, or ultrasound imaging.

A further objective of this invention is to allow the software implementation of the fast high precision matching method in a general computer platform without any special hardware to reduce cost and system complexity.

SUMMARY OF THE INVENTION

A fast high precision matching method receives an input image and a template. An initial search method uses the input image and the template to create an initial search result output. A high precision match uses the initial search result, the input image, and the template to create a high precision match result output. The high precision match method estimates high precision parameters by image interpolation and interpolation parameter optimization. The high precision match method also performs robust matching by limiting pixel contribution or pixel weighting. An invariant high precision match method estimates subpixel position and subsampling scale and rotation parameters by image interpolation and interpolation parameter optimization on the log-converted radial-angular transformation domain.

BRIEF DESCRIPTION OF THE DRAWINGS

The preferred embodiment and other aspects of the invention will become apparent from the following detailed description of the invention when read in conjunction with the accompanying drawings, which are provided for the purpose of describing embodiments of the invention and not for limiting same, in which:

FIG. 1 shows the processing flow for the fast high precision matching method;

FIG. 2 shows the processing flow for the high precision match within one pixel range;

FIG. 3 shows the processing flow for the high precision match beyond one pixel range;

FIG. 4 shows a matching function maximization method that finds the best α and β values;

FIG. 5 shows the processing flow of the fast high precision projection match;

FIG. 6 shows A matching function maximization method that finds the best α, β, γ, and δ values.

DETAILED DESCRIPTION OF THE INVENTION

I. Application Scenarios

A high precision matching produces highly precise results such as subpixel matching positions, high precision angles, scales, and/or focus positions. The processing flow of a fast high precision matching application scenario of this invention is shown in FIG. 1.

As shown in FIG. 1, the input image 100 and the template 102 are processed by an initial search 104 step. This results in an initial search result 108 output. The initial search 104 method searches through a large volume of data to identify the initial locations, scale, and angles that correspond to the match candidates. The initial match is fast but results are often not precise. In one embodiment of the invention, a “Fast Pattern Searching”, U.S. patent application Ser. No. 10/283,380 and a “Fast Invariant Pattern Search”, U.S. patent application Ser. No. 10/302,466 is used for initial search. Those skilled in the art should recognize that other methods such as standard normalized correlation method or geometric pattern matching method could be used for initial search. The initial search results are refined by the high precision match 106 step to create a high precision match result 110 output having subpixel matching positions, high precision angles, scales, and/or focus positions.

The initial search includes non-invariant and invariant searches. Similarly, the high precision match includes non-invariant and invariant high precision matches. Non-invariant search and match methods search and match template position(s) from an input image 100. The invariant search and match methods search and match template 102 and input image position subject to rotation, scale, and other variations such as focus changes, etc.

II. Non-Invariant High Precision Match

The non-invariant high precision match method produces sub-pixel matching results. In one embodiment of the invention, the basic formula of the non-invariant high precision match is described in the following section.

II.1. Matching Function

The typical matching operation is based on the normalized correlation method. The normalized correlation based matching function between two images I and J, Mat(I,J), can be described by the following formula:

${{Mat}\left( {I,J} \right)} = \frac{{COV}\left( {I,J} \right)}{\sqrt{{{VAR}(I)}{{VAR}(J)}}}$ Where COV(I,J) is the covariance between images I and J and is described by the following formula

${{COV}\left( {I,J} \right)} = {{\frac{1}{N}{\sum\limits_{x,y}^{\;}\;{{{I\lbrack x\rbrack}\lbrack y\rbrack}{{J\lbrack x\rbrack}\lbrack y\rbrack}}}} - {\left( {\frac{1}{N}{\sum\limits_{x,y}^{\;}\;{{I\lbrack x\rbrack}\lbrack y\rbrack}}} \right)\left( {\frac{1}{N}{\sum\limits_{x,y}^{\;}\;{{J\lbrack x\rbrack}\lbrack y\rbrack}}} \right)}}$ and the variance of image I, VAR(I) is described as

${{VAR}(I)} = {{\frac{1}{N}{\sum\limits_{x,y}^{\;}\;{{{I\lbrack x\rbrack}\lbrack y\rbrack}{{I\lbrack x\rbrack}\lbrack y\rbrack}}}} - {\left( {\frac{1}{N}{\sum\limits_{x,y}^{\;}\;{{I\lbrack x\rbrack}\lbrack y\rbrack}}} \right){\left( {\frac{1}{N}{\sum\limits_{x,y}^{\;}\;{{I\lbrack x\rbrack}\lbrack y\rbrack}}} \right).}}}$

The image region area N is described as

$N = {\sum\limits_{x,y}^{\;}\; 1.}$

The variance of image J, VAR(J) can be similarly defined.

II.2. High Precision by Image Interpolation

The high precision is achieved by image interpolation. In one embodiment of the invention, the image interpolation is performed by linear interpolation. As an example, we describe bilinear interpolation between four pixels in this section.

Let the interpolated image of input image I be K_(αβ). Where α and β (0≦α,β<1) are subpixel values in x and y dimensions. In the bilinear interpolation method, the pixel value of the interpolated image is described by the following formula: K _(αβ) [x][y]=(1−α)(1−β)I[x][y]+α(1−β)I[x+1][y]+β(1−α)I[x][y+1]+αβI[x+1][y+1]

Those skilled of art should recognize that any linear interpolation method such as weighted linear interpolation could be used in the invention for high precision matching. Furthermore, the interpolation could include more than 4 pixels.

The covariance of the K_(αβ) and J can be written as

$\begin{matrix} \begin{matrix} \begin{matrix} \begin{matrix} \begin{matrix} {{{COV}\left( {K_{\alpha\;\beta},J} \right)} = {{\sum\limits_{x,y}^{\;}\;{{{K_{\alpha\;\beta}\lbrack x\rbrack}\lbrack y\rbrack}{{J\lbrack x\rbrack}\lbrack y\rbrack}}} - {\left( {\sum\limits_{x,y}^{\;}\;{{K_{\alpha\;\beta}\lbrack x\rbrack}\lbrack y\rbrack}} \right)\left( {\sum\limits_{x,y}^{\;}\;{{J\lbrack x\rbrack}\lbrack y\rbrack}} \right)}}} \\ {\mspace{146mu}{= {{\left( {1 - \alpha} \right)\left( {1 - \beta} \right){{COV}\left( {I_{00},J} \right)}} + {{\alpha\left( {1 - \beta} \right)}{{COV}\left( {I_{10},J} \right)}} +}}} \end{matrix} \\ {\mspace{175mu}{{{\beta\left( {1 - \alpha} \right)}{{COV}\left( {I_{01},J} \right)}} + {\alpha\;\beta\;{{COV}\left( {I_{11},J} \right)}}}} \end{matrix} \\ {Where} \end{matrix} \\ {{{COV}\left( {I_{l\; m},J} \right)} = {{\frac{1}{N}{\sum\limits_{x,y}^{\;}\;{{{I\left\lbrack {x + l} \right\rbrack}\left\lbrack {y + m} \right\rbrack}{{J\lbrack x\rbrack}\lbrack y\rbrack}}}} -}} \end{matrix} \\ {\begin{matrix} {\mspace{194mu}{\left( {\frac{1}{N}{\sum\limits_{x,y}^{\;}\;{{I\left\lbrack {x + l} \right\rbrack}\left\lbrack {y + m} \right\rbrack}}} \right)\left( {\frac{1}{N}{\sum\limits_{x,y}^{\;}\;{{J\lbrack x\rbrack}\lbrack y\rbrack}}} \right)}\mspace{25mu}} \\ {{{for}\mspace{14mu} l},{m = 0},1.} \end{matrix}\;} \end{matrix}$

The variance of the K_(αβ) and J can be written as

$\begin{matrix} {\begin{matrix} {{{VAR}\left( K_{\alpha\;\beta} \right)} = {{\sum\limits_{x,y}^{\;}\;{{{K_{\alpha\;\beta}\lbrack x\rbrack}\lbrack y\rbrack}{{K_{\alpha\;\beta}\lbrack x\rbrack}\lbrack y\rbrack}}} - {\left( {\sum\limits_{x,y}^{\;}\;{{K_{\alpha\;\beta}\lbrack x\rbrack}\lbrack y\rbrack}} \right)\left( {\sum\limits_{x,y}^{\;}\;{{K_{\alpha\beta}\lbrack x\rbrack}\lbrack y\rbrack}} \right)}}} \\ {= {{\left( {1 - \alpha} \right)^{2}\left( {1 - \beta} \right)^{2}{{VAR}\left( I_{00} \right)}} + {{\alpha^{2}\left( {1 - \beta} \right)}^{2}{{VAR}\left( I_{10} \right)}} +}} \\ {{{\beta^{2}\left( {1 - \alpha} \right)}^{2}{{COV}\left( I_{01} \right)}} + {\alpha^{2}\;\beta^{2}\;{{COV}\left( I_{11} \right)}} +} \\ {{2{\alpha\left( {1 - \alpha} \right)}\left( {1 - \beta} \right)^{2}{{COV}\left( {I_{00},I_{10}} \right)}} +} \\ {{2\beta\left( {1 - \beta} \right)\left( {1 - \alpha} \right)^{2}{{COV}\left( {I_{00},I_{01}} \right)}} +} \\ {{2\alpha\;{\beta\left( {1 - \alpha} \right)}{\left( {1 - \beta} \right)\left\lbrack {{{COV}\left( {I_{00},I_{11}} \right)} + {{COV}\left( {I_{10},I_{01}} \right)}} \right\rbrack}} +} \\ {{2\alpha^{2}{\beta\left( {1 - \beta} \right)}{{COV}\left( {I_{10},I_{11}} \right)}} + {2\alpha\;{\beta^{2}\left( {1 - \alpha} \right)}{{COV}\left( {I_{01},I_{11}} \right)}}} \end{matrix}{Where}} \\ {{{COV}\left( {I_{l\; m},I_{qr}} \right)} = {{\frac{1}{N}{\sum\limits_{x,y}^{\;}\;{{{I\left\lbrack {x + l} \right\rbrack}\left\lbrack {y + m} \right\rbrack}{{I\left\lbrack {x + q} \right\rbrack}\left\lbrack {y + r} \right\rbrack}}}} -}} \\ {\mspace{256mu}{\left( {\frac{1}{N}{\sum\limits_{x,y}^{\;}\;{{I\left\lbrack {x + l} \right\rbrack}\left\lbrack {y + m} \right\rbrack}}} \right)\left( {\frac{1}{N}{\sum\limits_{x,y}^{\;}\;{{I\left\lbrack {x + q} \right\rbrack}\left\lbrack {y + r} \right\rbrack}}} \right)}} \\ {{{for}\mspace{14mu} q},{r = {0\mspace{14mu}{and}\mspace{14mu} 1.\mspace{14mu}{And}}}} \\ {{{VAR}\left( I_{l\; m} \right)} = {{\frac{1}{N}{\sum\limits_{x,y}^{\;}\;{{{I\left\lbrack {x + l} \right\rbrack}\left\lbrack {y + m} \right\rbrack}{{I\left\lbrack {x + l} \right\rbrack}\left\lbrack {y + m} \right\rbrack}}}} -}} \\ {\mspace{245mu}{\left( {\frac{1}{N}{\sum\limits_{x,y}^{\;}\;{{I\left\lbrack {x + l} \right\rbrack}\left\lbrack {y + m} \right\rbrack}}} \right)\left( {\frac{1}{N}{\sum\limits_{x,y}^{\;}\;{{I\left\lbrack {x + l} \right\rbrack}\left\lbrack {y + m} \right\rbrack}}} \right)}} \end{matrix}$ From the above formula, the matching function Mat(I,J), can be described as a function of the subpixel values α and β.

The high precision match result around a pixel position (x,y) is the subpixel values a and β correspond to the maximum value of the above matching function. When the initial search accuracy is within one pixel precision, the high precision match can be performed for the optimal subpixel values within each of the initial search result position (x,y). The processing flow of the high precision match within one pixel range is shown in FIG. 2. The input image 100 and the initial search result position (x,y) 200 are used along with the template 102 for matching function maximization 202. This results in the optimal subpixel values 204.

Those skilled in the art should recognize that multiple within one pixel range high precision matches can be used if the initial search result includes multiple candidate positions.

When the initial search result is not within one pixel precision, the high precision match can be performed for the optimal subpixel values within the pixel or the neighboring pixel of each of the initial search result position (x,y). The subpixel position whose maximum matching function is the highest among those of the pixel or the neighboring pixel is the optimal subpixel position of the high precision matching. The processing flow of the high precision match beyond one pixel range is shown in FIG. 3.

As shown in FIG. 3, a neighboring position creation module 300 takes the initial search result position (x,y) 200 and creates s number of neighboring positions, 302, . . . , 304. In one embodiment of the invention, the 3 by 3 adjacent neighbors of (x,y) are selected. That is, s=8. In another embodiment of the invention, the pixels immediate above, immediate below, immediate to the left, and immediate to the right of (x,y) are selected. Therefore, s=4. Those skilled in the art should recognize that other methods of neighboring position generation could be used and they are all within the scope of the current invention.

The initial search result position (x,y) 200 and its neighboring positions, 302, . . . , 304, are used to perform matching function maximization 202 for their respective within one pixel position. The maximum values for each position 306, 308, . . . , 310, are compared and the global maximum is selected by the maximum and position determination module 312. The optimal subpixel values 204 are the values correspond to the position having the highest matching function value among the initial search result position (x,y) 200 and its neighboring positions, 302, . . . , 304.

In another embodiment of the invention, the beyond one pixel range high precision matches is performed by using more than four pixels for bi-linear interpolation. For example 16 pixels could be used for interpolation.

Those skilled in the art should recognize that multiple beyond one pixel range high precision matches can be applied if the initial search result includes multiple candidate positions.

II.3. Matching Function Maximization

The matching function maximization method finds the maximum parameters that yield the maximum matching function. The matching function maximization can be performed using optimization methods such as the random optimization method, first order, second order, or quadratic fitting, etc.

To determine Mat(I,J) as a function of α and β, Mat(α,β), we rewrite COV(K_(αβ),J) and VAR(K_(αβ)) as: COV(K _(αβ) ,J)=A ₁ αβ+A ₂ α+A ₃ β+A ₄ Where

-   A₁=COV(I₀₀,J)+COV(I₁₁,J)−COV(I₁₀,J)−COV(I₀₁,J), -   A₂=COV(I₁₀,J)−COV(I₀₀,J), A₃=COV(I₀₁,J)−COV(I₀₀,J), A₄=COV(I₀₀,J),     and     VAR(K _(αβ))=B ₁α²β² +B ₂α² β+B ₃αβ² +B ₄ αβ+B ₅α² +B ₆ β+B ₇ α+B ₈     β8+B ₉     Where -   B₁=VAR(I₀₀)+VAR(I₁₀)+VAR(I₀₁)+VAR(I₁₁)+2COV(I₀₀,I₁₁)+2COV(I₁₀,I₀₁)−2COV(I₀₀,I₁₀)−2COV(I₀₀,I₀₁)−2COV(I₁₀,I₁₁)−2COV(I₀₁,I₁₁), -   B₂=−2VAR(I₀₀)−2VAR(I₁₀)+4COV(I₀₀,     I₁₀)+2COV(I₀₀,I₀₁)−2COV(I₀₀,I₁₁)−2COV(I₁₀,I₀₁)(I₁₀,I₀₁)+2COV(I₁₀,I₁₁), -   B₃=−2VAR(I₀₀)−2VAR(I₀₁)+2COV(I₀₀,I₁₀)+4COV(I₀₀,I₀₁)−2COV(I₀₀,I₁₁)−2COV(I₁₀,I₀₁)(I₁₀,I₀₁)+2COV(I₀₁,I₁₁), -   B₄=4VAR(I₀₀)−4COV(I₀₀,I₁₀)−4COV(I₀₀,I₀₁)+2COV(I₀₀,I₀₁)+2COV(I₁₀,I₀₁), -   B₅=VAR(I₀₀)+VAR(I₁₀)−2COV(I₀₀,I₁₀),     B₆=VAR(I₀₀)+VAR(I₀₁)−2COV(I₀₀,I₀₁), -   B₇=−2VAR(I₀₀)+2COV(I₀₀,I₁₀), B₈=−2VAR(I₀₀)+2COV(I₀₀,I₀₁), and     B₉=VAR(I₀₀).

The necessary condition for maximizing the matching function is

$\frac{\partial{{MAT}\left( {\alpha,\beta} \right)}}{\partial\alpha} = {{0\mspace{14mu}{and}\mspace{14mu}\frac{\partial{{MAT}\left( {\alpha,\beta} \right)}}{\partial\beta}} = 0}$ Equivalently,

$\frac{\partial{M\left( {\alpha,\beta} \right)}}{\partial\alpha} = {{0\mspace{14mu}{and}\mspace{14mu}\frac{\partial{M\left( {\alpha,\beta} \right)}}{\partial\beta}} = 0}$ Where M(α,β)=[MAT(α,β)]². This results in

$\begin{matrix} {{2{{VAR}\left( K_{\alpha\;\beta} \right)}\frac{\partial{{COV}\left( {K_{\alpha\;\beta},J} \right)}}{\partial\alpha}} = {{{COV}\left( {K_{\alpha\;\beta},J} \right)}\frac{\partial{{VAR}\left( K_{\alpha\;\beta} \right)}}{\partial\alpha}}} \\ {and} \\ {{2{{VAR}\left( K_{\alpha\;\beta} \right)}\frac{\partial{{COV}\left( {K_{\alpha\;\beta},J} \right)}}{\partial\beta}} = {{{COV}\left( {K_{\alpha\;\beta},J} \right)}\frac{\partial{{VAR}\left( K_{\alpha\;\beta} \right)}}{\partial\beta}}} \end{matrix}$ From the above formula, for a given β (0≦β<1), the best α can be determined by the following formula:

$\alpha = {- \frac{{p_{3}\beta^{3}} + {p_{5}\beta^{2}} + {p_{6}\beta} + p_{8}}{{p_{1}\beta^{3}} + {p_{2}\beta^{2}} + {p_{4}\beta} + p_{7}}}$ Where

-   p₁=A₁B₃−2A₃B₁, p₂=A₁B₄+A₂B₃−2A₃B₂−2A₄B₁, -   p₃=2A₁B₆−A₃B₃, p₄=A₁B₇+A₂B₄−2A₃B₅−2A₄B₂, -   p₅=2A₁B₈+2A₂B₆−A₃B₄−A₄B₃, P₆=2A₁B₉+2A₂B₈−A₃B₇−A₄B₄, -   p₇=A₂B₇−2A₄B₄, p₈=2A₂B₉−A₄B₇

Since α is between 0 and 1. So we set α=0 if the above ax calculation results in α<0. Similarly, we set α=1 if the above a calculation results in α>1. The formula for determining the best β value when an a is given, can be calculated using a similar method.

In one embodiment of the invention, the matching function maximization method that finds the α and β is performed by an iterative procedure as shown in FIG. 4.

As shown in FIG. 4, an initial β value 400 is selected. The value could be randomly selected between 0 and 1 or could be a pre-determined value such as 0.5, etc. Using the initial β value, the best a value can be found 402 by the above close form solution. The best α value is in term used to find the best β value 404. The best β value can then be applied back to the best α finding 402 and then best β finding 404 processes. This process is iterated until the α and β values are stable (having little change per iteration) or an exit condition such as the maximum number of iterations is reached. The resulting α and β values are the best α and β values 406.

Those skilled in the art should recognize that other methods of optimization could be applied to determine the optimal subpixel values.

II.4. Fast High Precision Match

The matching function, Mat(I,J), described in section II.1 matches two images I and J. If we assume that I is the input image and J is the template, then we need to calculate the variance parameters B₁, B₂, B₃, B₄, B₅, B₆, B₇, B₈, and B₉ for each candidate regions of the input image since the interpolation is performed on the input image. This could be time consuming if there are many candidate regions for matching. A fast high precision matching can be achieved by interpolating on the template. In this case, the matching function can be described as:

${{Mat}\left( {I,I_{tmp}} \right)} = \frac{{COV}\left( {I,I_{tmp}} \right)}{\sqrt{{{VAR}(I)}{{VAR}\left( I_{tmp} \right)}}}$ Wherein the variance parameters B₁, B₂, B₃, B₄, B₅, B₆, B₇, B₈, and B₉ of the variance VAR[I_(tmp)(α,β)] can be pre-calculated for the fixed template. Therefore, only the covariance parameters A₁, A₂, A₃, and A₄ of the covariance term COV[I,I_(tmp)(α,β)] has to be calculated during the high precision matching process for each input region. II.5. Fast High Precision Projection Match

Image projection is often performed in fast template search to reduce the search dimensions. A fast regular shaped pattern search method was disclosed (Fast Regular Shaped Pattern Searching, U.S. patent application Ser. No. 10/255,016) that performs fast pattern matching with flexible projection kernels to construct regular-shaped patterns using an accumulation method. The high precision match method of this invention could be applied to projected images.

The image projection profile P of an image I can be described as the summation over a given geometric region R.

${{P\lbrack x\rbrack}\lbrack y\rbrack} = {\overset{\mspace{11mu}}{\sum\limits_{{({u,v})} \in R}}\;{{I\left\lbrack {x + u} \right\rbrack}\left\lbrack {y + v} \right\rbrack}}$

We interpolate image pixel values by bilinear combination as follows: I _(αβ) [x][y]=(1−α)(1−β)I[x][y]+α(1−β)I[x+1][y]+β(1−α)I[x][y+1]+αβI[x+1][y+1]

Then the projection profile values of the interpolate image pixel values are the bilinear combination of the non-interpolated projection values. That is, image interpolation first then projection is equal to image projection first and then interpolate on the projection profiles.

$\begin{matrix} {{{P_{\alpha\beta}\lbrack x\rbrack}\lbrack y\rbrack} = {\sum\limits_{{({u,v})} \in R}^{\;`}\;{{I_{\alpha\beta}\left\lbrack {x + u} \right\rbrack}\left\lbrack {y + v} \right\rbrack}}} \\ {= {{\left( {1 - \alpha} \right)\left( {1 - \beta} \right){{P\lbrack x\rbrack}\lbrack y\rbrack}} + {{\alpha\left( {1 - \beta} \right)}{{P\left\lbrack {x + 1} \right\rbrack}\lbrack y\rbrack}} +}} \\ {{{\beta\left( {1 - \alpha} \right)}{{P\lbrack x\rbrack}\left\lbrack {y + 1} \right\rbrack}} + {{\alpha\beta}\;{{P\left\lbrack {x + 1} \right\rbrack}\left\lbrack {y + 1} \right\rbrack}}} \end{matrix}$

Based on this property, the above disclosed matching function optimization method could be similarly applied to achieve fast high precision match on projected image. The processing flow of the fast high precision projection match is shown in FIG. 5.

As shown in FIG. 5, the input projection profile 500 and the template profile 502 are subject to high precision projection match 504. The high precision projection match 504 can be performed by either interpolating the input project profile 500 or interpolating the template profile 502. The high precision match 504 process optimizes the interpolation parameters by maximizing the projection domain matching function using the same or similar methods as described above. The resulting optimal interpolation parameters are the high precision projection match result 506.

II.6. Robust Matching

In many practical applications the input image could be degraded due to noise, artifact, distortion, missing features, etc. To achieve high precision matching results, robust matching scheme may be required. Two high precision robust matching methods are provided in this invention: limiting pixel contribution and pixel weighting. The speed advantage is applicable to the high precision robust matching methods of this invention.

In one embodiment of the invention, the limiting pixel contribution method limits the contribution of each pixel to the covariance value calculation by the following rule:

$\begin{matrix} {{{COV}\left( {I,J} \right)} = {{\frac{1}{N}{\sum\limits_{x,y}^{\;}\;{{Min}\left( {{{{I\lbrack x\rbrack}\lbrack y\rbrack}{{J\lbrack x\rbrack}\lbrack y\rbrack}},C_{\max}} \right)}}} -}} \\ {\left( {\frac{1}{N}{\sum\limits_{x,y}^{\;}\;{{I\lbrack x\rbrack}\lbrack y\rbrack}}} \right)\left( {\frac{1}{N}{\sum\limits_{x,y}^{\;}\;{{J\lbrack x\rbrack}\lbrack y\rbrack}}} \right)} \end{matrix}$ Where C_(max) is the maximum allowable cross product value for a pixel.

Based on the new covariance calculation formula, the matching function, Mat(I,J), is updated and the same procedure for high precision parameter estimation applies. Therefore, the speed advantage is preserved.

In another embodiment of the invention, the robust matching is accomplished by weighing pixels with their significance/reliability. Pixels with noise, distortion, etc. are given lower weights for matching.

In this case, the variance and covariance can be calculated by the following rule:

$\begin{matrix} {{{COV}\left( {I,J} \right)} = {{\frac{1}{W_{T}}{\sum\limits_{x,y}^{\;}\;{{{W\lbrack x\rbrack}\lbrack y\rbrack}{{I\lbrack x\rbrack}\lbrack y\rbrack}{{J\lbrack x\rbrack}\lbrack y\rbrack}}}} -}} \\ {\left( {\frac{1}{W_{T}}{\sum\limits_{x,y}^{\;}\;{{{W\lbrack x\rbrack}\lbrack y\rbrack}{{I\lbrack x\rbrack}\lbrack y\rbrack}}}} \right)\left( {\frac{1}{W_{T}}{\sum\limits_{x,y}^{\;}{{{W\lbrack x\rbrack}\lbrack y\rbrack}{{J\lbrack x\rbrack}\lbrack y\rbrack}}}} \right)} \end{matrix}$ $\begin{matrix} {{{VAR}(I)} = {{\frac{1}{W_{T}}{\sum\limits_{x,y}^{\;}\;{{{W\lbrack x\rbrack}\lbrack y\rbrack}{{I\lbrack x\rbrack}\lbrack y\rbrack}{{I\lbrack x\rbrack}\lbrack y\rbrack}}}} -}} \\ {\left( {\frac{1}{W_{T}}{\sum\limits_{x,y}^{\;}\;{{{W\lbrack x\rbrack}\lbrack y\rbrack}{{I\lbrack x\rbrack}\lbrack y\rbrack}}}} \right)\left( {\frac{1}{W_{T}}{\sum\limits_{x,y}^{\;}{{{W\lbrack x\rbrack}\lbrack y\rbrack}{{I\lbrack x\rbrack}\lbrack y\rbrack}}}} \right)} \end{matrix}$ Where the total weight

$W_{T} = {\sum\limits_{x,y}^{\;}\;{{W\lbrack x\rbrack}\lbrack y\rbrack}}$

Based on the new variance and covariance calculation formula, the matching function, Mat(I,J), is updated and the same procedure for high precision parameter estimation applies. Therefore, the speed advantage is maintained.

In yet another embodiment of the invention, the limiting pixel contribution and the pixel weighting methods can be combined. The combined covariance calculation formula is as follows:

$\begin{matrix} {{{COV}\left( {I,J} \right)} = {{\frac{1}{W_{T}}{\sum\limits_{x,y}^{\;}\;{{Min}\left( {{{{W\lbrack x\rbrack}\lbrack y\rbrack}{{I\lbrack x\rbrack}\lbrack y\rbrack}{{J\lbrack x\rbrack}\lbrack y\rbrack}},C_{\max}} \right)}}} -}} \\ {\left( {\frac{1}{W_{T}}{\sum\limits_{x,y}^{\;}\;{{{W\lbrack x\rbrack}\lbrack y\rbrack}{{I\lbrack x\rbrack}\lbrack y\rbrack}}}} \right)\left( {\frac{1}{W_{T}}{\sum\limits_{x,y}^{\;}{{{W\lbrack x\rbrack}\lbrack y\rbrack}{J\lbrack x\rbrack}}}} \right.} \end{matrix}$

The combined covariance can be used for fast high precision match.

III. Invariant High Precision Match

The invariant high precision match method handles scale and rotation invariant matching and produces sub-pixel position and high precision rotation angle and scale values as matching results. In one embodiment of the invention, the basic formula for the high precision scale and rotation invariant match is described in the following section.

III.1. Matching Function with Scale and Rotation Invariance

In addition to the sub-pixel matching, the scale and rotation invariant matching requires sub-sampling on scale and rotation adjustment. The scale and rotation sampling is nonlinear in regular pixel coordinate. The prior art approach performs nonlinear re-sampling to achieve scale and rotation invariance, which is time consuming and error prone.

Therefore, we perform radial-angular coordinate transformation first. The rotation angle is linear in the radial-angular coordinate. However, the scale factor is still nonlinear in the radial-angular coordinate. This invention performs log-converted radial-angular transformation that is linear in both scale and rotation sampling.

III.2. Log-Converted Radial-Angular Transformation

The log-converted radial-angular coordinate transformation takes advantage of the relationship log(θr)=log θ+log r to the radial-angular coordinate transformed domain. Therefore, the effect of the scale factor is an offset in the log-converted radial-angular coordinate system.

Considering the radial-angular (r, θ) coordinate system, where r denotes radial distance from the center (x_(c), y_(c)) and θ denotes angle. Any (x,y) point can be represented in radial-angular coordinates (r, θ):

$r = \sqrt{\left( {x - x_{c}} \right)^{2} + \left( {y - y_{c}} \right)^{2}}$ $\theta = {\tan^{- 1}\left( \frac{y - y_{c}}{x - x_{c}} \right)}$

Let ρ=log r, the coordinate transformation between the Cartesian coordinate system and the log-converted radial-angular coordinate system is described by the following formula: x=exp(ρ)cos θ y=exp(ρ)sin θ The area element is dxdy=exp(2ρ)dρdθ=r ² dσdθ.

Let the image Ψ be the weighted transform image of the log-converted radial-angular coordinate as follows: Ψ[θ][ρ]=exp(ρ)I[θ][ρ].

In the transformed domain, the matching function for images Ψ, Φ can be defined as

${{Mat}\left( {\Psi,\Phi} \right)} = \frac{{COV}\left( {\Psi,\Phi} \right)}{\sqrt{{{VAR}(\Psi)}{{VAR}(\Phi)}}}$ Where $\begin{matrix} {{{COV}\left( {\Psi,\Phi} \right)} = {{\frac{1}{N}{\sum\limits_{\theta,\rho}^{\;}\;{{{\Psi\lbrack\theta\rbrack}\lbrack\rho\rbrack}{{\Phi\lbrack\theta\rbrack}\lbrack\rho\rbrack}}}} -}} \\ {\left( {\frac{1}{N}{\sum\limits_{\theta,\rho}^{\;}{{\Psi\lbrack\theta\rbrack}\lbrack\rho\rbrack}}} \right)\left( {\frac{1}{N}{\sum\limits_{\theta,\rho}^{\;}{{\Psi\lbrack\theta\rbrack}\lbrack\rho\rbrack}}} \right)} \end{matrix}$ $\begin{matrix} {{{VAR}(\Psi)} = {{\frac{1}{N}{\sum\limits_{\theta,\rho}^{\;}\;{{{\Psi\lbrack\theta\rbrack}\lbrack\rho\rbrack}{{\Phi\lbrack\theta\rbrack}\lbrack\rho\rbrack}}}} -}} \\ {\left( {\frac{1}{N}{\sum\limits_{\theta,\rho}^{\;}{{\Psi\lbrack\theta\rbrack}\lbrack\rho\rbrack}}} \right)\left( {\frac{1}{N}{\sum\limits_{\theta,\rho}^{\;}{{\Psi\lbrack\theta\rbrack}\lbrack\rho\rbrack}}} \right)} \end{matrix}$ Where

$N = {\sum\limits_{\theta,\rho}^{\;}\; 1.}$ This matching function bears the same form as the shift invariant matching function. Therefore, the bilinear interpolation or other linear interpolation methods can be used for invariant high precision match. III.3. Sub-Pixel and Sub-Sampling Shift, Rotation and Scale Invariant Matching

In this invention, sub-pixel and sub-sampling image interpolation are used for high precision shift, rotation and scale invariant matching. In the following we describe the method in two dimensional case. Those skilled in the art should recognize that this method is also applicable to higher dimensional case by adding more interpolation parameters for optimization.

In the two dimensional case, the shift, rotation and scale invariant matching is accomplished by interpolation using four parameters. Two of the parameters, α and β, are interpolation parameters for position shift (translation). The other two parameters, γ and δ, are interpolation parameters for fine rotation and scale values. The quad-linear interpolated images in log-converted radial-angular coordinate system is represented as

$\begin{matrix} {{{\Psi\lbrack\theta\rbrack}\lbrack\rho\rbrack} = {\left( {1 - \alpha} \right)\left( {1 - \beta} \right)\left\{ {{\left( {1 - \gamma} \right)\left( {1 - \delta} \right){{\Psi_{00}\lbrack\theta\rbrack}\lbrack\rho\rbrack}} + {\gamma\left( {1 - \delta} \right)}} \right.}} \\ {{{\Psi_{00}\left\lbrack {\theta + 1} \right\rbrack}\lbrack\rho\rbrack} + {{\delta\left( {1 - \gamma} \right)}{{\Psi_{00}\lbrack\theta\rbrack}\left\lbrack {\rho + 1} \right\rbrack}} + {\delta\;\gamma\;{\Psi_{00}\left\lbrack {\theta + {\alpha\left( {1 -} \right.}} \right.}}} \\ {\left. \beta \right)\left\{ {{\left( {1 - \gamma} \right)\left( {1 - \delta} \right){{\Psi_{10}\lbrack\theta\rbrack}\lbrack\rho\rbrack}} + {{\gamma\left( {1 - \delta} \right)}{{\Psi_{10}\left\lbrack {\theta + 1} \right\rbrack}\lbrack\rho\rbrack}} + {\delta\left( {1 -} \right.}} \right.} \\ {\left. {{\left. \gamma \right){{\Psi_{10}\lbrack\theta\rbrack}\left\lbrack {\rho + 1} \right\rbrack}} + {\delta\;{{{\gamma\Psi}_{10}\left\lbrack {\theta + 1} \right\rbrack}\left\lbrack {\rho + 1} \right\rbrack}}} \right\} + {{\beta\left( {1 - \alpha} \right)}\left\{ \left( {1 -} \right. \right.}} \\ {{\left. \gamma \right)\left( {1 - \delta} \right){{\Psi_{01}\lbrack\theta\rbrack}\lbrack\rho\rbrack}} + {{\gamma\left( {1 - \delta} \right)}{{\Psi_{01}\left\lbrack {\theta + 1} \right\rbrack}\lbrack\rho\rbrack}} + {\delta\left( {1 -} \right.}} \\ {\left. {{\left. \gamma \right){{\Psi_{01}\lbrack\theta\rbrack}\left\lbrack {\rho + 1} \right\rbrack}} + {{{\delta\gamma\Psi}_{01}\left\lbrack {\theta + 1} \right\rbrack}\left\lbrack {\rho + 1} \right\rbrack}} \right\} + {{\alpha\beta}\left\{ {\left( {1 - \gamma} \right)\left( {1 -} \right.} \right.}} \\ {{\left. \delta \right){{\Psi_{11}\lbrack\theta\rbrack}\lbrack\rho\rbrack}} + {{\gamma\left( {1 - \delta} \right)}{{\Psi_{11}\left\lbrack {\theta + 1} \right\rbrack}\lbrack\rho\rbrack}} + {{\delta\left( {1 - \gamma} \right)}{{\Psi_{11}\lbrack\theta\rbrack}\left\lbrack {\rho +} \right.}}} \\ \left. {\left. 1 \right\rbrack + {{{\delta\gamma\Psi}_{11}\left\lbrack {\theta + 1} \right\rbrack}\left\lbrack {\rho + 1} \right\rbrack}} \right\} \end{matrix}$ Where Ψ₀₀[θ][ρ] is the weighted log-converted radial-angular coordinate transformed image of (x₀, y₀). Ψ₁₀[θ][ρ] is the weighted log-converted radial-angular coordinate transformed image of (x₀+1, y₀). Ψ₀₁[θ][ρ] is the weighted log-converted radial-angular coordinate transformed image of (x₀, y₀+1), and Ψ₁₁[θ][ρ] is the weighted log-converted radial-angular coordinate transformed image of (x₀+1, y₀+1). Rewriting the above equation as

${{\Psi\lbrack\theta\rbrack}\lbrack\rho\rbrack} = {\sum\limits_{k = 1}^{16}{{f_{k}\left( {\alpha,\beta,\gamma,\delta} \right)}{{\Lambda_{k}\lbrack\theta\rbrack}\lbrack\rho\rbrack}}}$ Where

-   f¹=(α,β,γ,δ)=(1−α)(1−β)(1−γ), f₂(α,β,γ,δ)=(1−α)(1−β)γ(1−δ), -   f₃(α,β,γ,δ)=(1−α)(1−β)(1−δ), f₄(α,β,γ,δ)=(1−α)(1−β)γδ, -   f₅(α,β,γ, δ)=α(1−β)(1−γ)(1−δ), f₆(α,β,γ,δ)=α(1−β)γ(1−δ), -   f₇(α,β,γ,δ)=α(1−β)(1−γ)δ, f₈(α,β,γ,δ)=α(1−α)βγ(1−δ), -   f₉(α,β,γ,δ)=(1−α)β(1−γ)(1−δ), f₁₀(α,β,γ,δ)=(1−α)βγδ, -   f₁₁(α,β,γ,δ)=(1−α)β(1−γ)δ, f₁₂(α,β,γ,δ)=(1−α)βγδ, -   f₁₃(α,β,γ,δ)=αβ(1−γ)(1−δ), f₁₄(α,β,γ,δ)=αβγ(1−δ), -   f₁₅(α,β,γ,δ)=αβ(1−γ)δ, and f₁₆(α,β,γ,δ)=αβγδ.     Also, -   Λ₁[θ][ρ]=Ψ₀₀[θ][ρ], Λ₂[θ][ρ]=Ψ₀₀[θ+1][ρ], -   Λ₃[θ][ρ]=Ψ₀₀[θ][ρ+1], Λ₄[θ][ρ]=Ψ₀₀[θ+1][ρ+1], -   Λ₅[θ][ρ]=Ψ₁₀[θ][ρ], Λ₆[θ][ρ]=Ψ₁₀[θ+1][ρ], -   Λ₇[θ][ρ]=Ψ₁₀[θ][ρ+1], Λ₈[θ][ρ]=Ψ₁₀[θ+1][ρ+1], -   Λ₉[θ][ρ]=Ψ₀₁[θ][ρ], Λ₁₀[θ][ρ]=Ψ₀₁[θ+1][ρ], -   Λ₁₁[θ][ρ]=Ψ₀₁[θ][ρ+1], Λ₁₂[θ][ρ]=Ψ₀₁[θ+1][ρ+1], -   Λ₁₃[θ][ρ]=Ψ₁₁[θ][ρ], Λ₁₄[θ][ρ]=Ψ₁₁,[θ+1][ρ], -   Λ₁₅[θ][ρ]=Ψ₁₁[θ][ρ+1], and Λ₁₆[θ][ρ]=Ψ₁₁[θ+1][ρ+1].

The covariance of Ψ, Φ is therefore

${{COV}\left( {\Psi,\Phi} \right)} = {\sum\limits_{k = 1}^{16}{{f_{k}\left( {\alpha,\beta,\gamma,\delta} \right)}{{COV}\left( {\Lambda_{k},\Phi} \right)}}}$ and the variance of Ψ is

$\begin{matrix} {{{VAR}(\Psi)} = {{\sum\limits_{k = 1}^{16}{\left\lbrack {f_{k}\left( {\alpha,\beta,\gamma,\delta} \right)} \right\rbrack^{2}{{VAR}\left( \Lambda_{k} \right)}}} +}} \\ {2{\sum\limits_{k > m}^{16}{{f_{k}\left( {\alpha,\beta,\gamma,\delta} \right)}{f_{m}\left( {\alpha,\beta,\gamma,\delta} \right)}{{COV}\left( {\Lambda_{k},\Lambda_{m}} \right)}}}} \end{matrix}$

The matching score between Ψ, Φ as a function of the high precision interpolation parameters is

${{Mat}\left( {\Psi,{\Phi;\alpha},\beta,\gamma,\delta} \right)} = \frac{{COV}\left( {\Psi,\Phi} \right)}{\sqrt{{{VAR}(\Psi)}{{VAR}(\Phi)}}}$

The best subpixel and subsampling matching can be determined by finding parameters α, β, γ, δ and a that correspond to the maximum value of the MatΨ(Φ;α,β,γ,δ). The parameters are the invariant high precision match result. This is an optimization problem similar to the above non-invariant high precision match. Many optimization methods can be used for determining the four parameters. Typical methods include random optimization (RO), bi-directional RO (BRO), improved BRO (IBRO), gradient method, alternative gradient method, and golden section method, etc.

In one embodiment of the invention, the method to find α, β, γ, and δ is described as follows.

Rewriting the COV(Ψ,Φ) and VAR(Ψ) as COV(Ψ,Φ)={right arrow over (u)} ^(T) {right arrow over (f)} and VAR(Ψ)= f ^(T) Ω{right arrow over (f)} where {right arrow over (f)}=[f₁, f₂, f₁₆]^(T), {right arrow over (u)}=[COV(Λ₁,Φ), COV(Λ₂,Φ), . . . , COV(Λ₁₆,Φ)]^(T), and

$\begin{matrix} {\Omega =} \\ {\begin{bmatrix} {{COV}\left( {\Lambda_{1},\Lambda_{1}} \right)} & {{COV}\left( {\Lambda_{1},\Lambda_{2}} \right)} & \cdots & {{COV}\left( {\Lambda_{1},\Lambda_{16}} \right)} \\ {{COV}\left( {\Lambda_{2},\Lambda_{1}} \right)} & {{COV}\left( {\Lambda_{2},\Lambda_{2}} \right)} & \cdots & {{COV}\left( {\Lambda_{2},\Lambda_{16}} \right)} \\ \cdots & \cdots & \cdots & \cdots \\ {{COV}\left( {\Lambda_{16},\Lambda_{1}} \right)} & {{COV}\left( {\Lambda_{16},\Lambda_{2}} \right)} & \cdots & {{COV}\left( {\Lambda_{16},\Lambda_{16}} \right)} \end{bmatrix}} \end{matrix}$

Given β, γ, and δ, the value a for the optimum matching function is

$\alpha = {- \frac{{\left( {{\overset{\rightarrow}{u}}^{T}{\overset{\rightarrow}{g}}_{\alpha}} \right)\left( {{\overset{\rightarrow}{g}}_{\alpha}^{T}\Omega\;{\overset{\rightarrow}{f}}_{\alpha}} \right)} - {\left( {{\overset{\rightarrow}{u}}^{T}{\overset{\rightarrow}{f}}_{\alpha}} \right)\left( {{\overset{\rightarrow}{g}}_{\alpha}^{T}\Omega\;{\overset{\rightarrow}{g}}_{\alpha}} \right)}}{{\left( {{\overset{\rightarrow}{u}}^{T}{\overset{\rightarrow}{g}}_{\alpha}} \right)\left( {{\overset{\rightarrow}{f}}_{\alpha}^{T}\Omega\;{\overset{\rightarrow}{f}}_{\alpha}} \right)} - {\left( {{\overset{\rightarrow}{u}}^{T}{\overset{\rightarrow}{f}}_{\alpha}} \right)\left( {{\overset{\rightarrow}{g}}_{\alpha}^{T}\Omega\;{\overset{\rightarrow}{f}}_{\alpha}} \right)}}}$

Similarly, for given α, γ and δ, the value β for the optimum matching function is

$\beta = {- \frac{{\left( {{\overset{\rightarrow}{u}}^{T}{\overset{\rightarrow}{g}}_{\beta}} \right)\left( {{\overset{\rightarrow}{g}}_{\beta}^{T}\Omega\;{\overset{\rightarrow}{f}}_{\beta}} \right)} - {\left( {{\overset{\rightarrow}{u}}^{T}{\overset{\rightarrow}{f}}_{\beta}} \right)\left( {{\overset{\rightarrow}{g}}_{\beta}^{T}\Omega\;{\overset{\rightarrow}{g}}_{\beta}} \right)}}{{\left( {{\overset{\rightarrow}{u}}^{T}{\overset{\rightarrow}{g}}_{\beta}} \right)\left( {{\overset{\rightarrow}{f}}_{\beta}^{T}\Omega\;{\overset{\rightarrow}{f}}_{\beta}} \right)} - {\left( {{\overset{\rightarrow}{u}}^{T}{\overset{\rightarrow}{f}}_{\beta}} \right)\left( {{\overset{\rightarrow}{g}}_{\beta}^{T}\Omega\;{\overset{\rightarrow}{f}}_{\beta}} \right)}}}$

For given α, β, and γ, the value δ for the optimum matching function is

$\gamma = {- \frac{{\left( {{\overset{\rightarrow}{u}}^{T}{\overset{\rightarrow}{g}}_{\gamma}} \right)\left( {{\overset{\rightarrow}{g}}_{\gamma}^{T}\Omega\;{\overset{\rightarrow}{f}}_{\gamma}} \right)} - {\left( {{\overset{\rightarrow}{u}}^{T}{\overset{\rightarrow}{f}}_{\gamma}} \right)\left( {{\overset{\rightarrow}{g}}_{\gamma}^{T}\Omega\;{\overset{\rightarrow}{g}}_{\gamma}} \right)}}{{\left( {{\overset{\rightarrow}{u}}^{T}{\overset{\rightarrow}{g}}_{\gamma}} \right)\left( {{\overset{\rightarrow}{f}}_{\gamma}^{T}\Omega\;{\overset{\rightarrow}{f}}_{\gamma}} \right)} - {\left( {{\overset{\rightarrow}{u}}^{T}{\overset{\rightarrow}{f}}_{\gamma}} \right)\left( {{\overset{\rightarrow}{g}}_{\gamma}^{T}\Omega\;{\overset{\rightarrow}{f}}_{\gamma}} \right)}}}$

For given α, β, and γ, the value δ for the optimum matching function is

$\delta = {- \frac{{\left( {{\overset{\rightarrow}{u}}^{T}{\overset{\rightarrow}{g}}_{\delta}} \right)\left( {{\overset{\rightarrow}{g}}_{\delta}^{T}\Omega\;{\overset{\rightarrow}{f}}_{\delta}} \right)} - {\left( {{\overset{\rightarrow}{u}}^{T}{\overset{\rightarrow}{f}}_{\delta}} \right)\left( {{\overset{\rightarrow}{g}}_{\delta}^{T}\Omega\;{\overset{\rightarrow}{g}}_{\delta}} \right)}}{{\left( {{\overset{\rightarrow}{u}}^{T}{\overset{\rightarrow}{g}}_{\delta}} \right)\left( {{\overset{\rightarrow}{f}}_{\delta}^{T}\Omega\;{\overset{\rightarrow}{f}}_{\delta}} \right)} - {\left( {{\overset{\rightarrow}{u}}^{T}{\overset{\rightarrow}{f}}_{\delta}} \right)\left( {{\overset{\rightarrow}{g}}_{\delta}^{T}\Omega\;{\overset{\rightarrow}{f}}_{\delta}} \right)}}}$ Where ${{\overset{\rightarrow}{f}}_{\alpha} = \begin{bmatrix} {{- \left( {1 - \beta} \right)}\left( {1 - \gamma} \right)\left( {1 - \delta} \right)} \\ {{- \left( {1 - \beta} \right)}{\gamma\left( {1 - \delta} \right)}} \\ {{- \left( {1 - \beta} \right)}\left( {1 - \gamma} \right)\delta} \\ {{- \left( {1 - \beta} \right)}{\gamma\delta}} \\ {\left( {1 - \beta} \right)\left( {1 - \gamma} \right)\left( {1 - \delta} \right)} \\ {\left( {1 - \beta} \right){\gamma\left( {1 - \delta} \right)}} \\ {\left( {1 - \beta} \right)\left( {1 - \gamma} \right)\delta} \\ {\left( {1 - \beta} \right){\gamma\delta}} \\ {{- {\beta\left( {1 - \gamma} \right)}}\left( {1 - \delta} \right)} \\ {- {{\beta\gamma}\left( {1 - \delta} \right)}} \\ {{- {\beta\left( {1 - \gamma} \right)}}\delta} \\ {- {\beta\gamma\delta}} \\ {{\beta\left( {1 - \gamma} \right)}\left( {1 - \delta} \right)} \\ {{\beta\gamma}\left( {1 - \delta} \right)} \\ {{\beta\left( {1 - \gamma} \right)}\delta} \\ {\beta\gamma\delta} \end{bmatrix}},\mspace{14mu}{{\overset{\rightarrow}{g}}_{\alpha} = \begin{bmatrix} {\left( {1 - \beta} \right)\left( {1 - \gamma} \right)\left( {1 - \delta} \right)} \\ {\left( {1 - \beta} \right){\gamma\left( {1 - \delta} \right)}} \\ {\left( {1 - \beta} \right)\left( {1 - \gamma} \right)\delta} \\ {\left( {1 - \beta} \right){\gamma\delta}} \\ 0 \\ 0 \\ 0 \\ 0 \\ {{\beta\left( {1 - \gamma} \right)}\left( {1 - \delta} \right)} \\ {{\beta\gamma}\left( {1 - \delta} \right)} \\ {{\beta\left( {1 - \gamma} \right)}\delta} \\ {\beta\gamma\delta} \\ 0 \\ 0 \\ 0 \\ 0 \end{bmatrix}}$ ${{\overset{\rightarrow}{f}}_{\beta} = \begin{bmatrix} {{- \left( {1 - \alpha} \right)}\left( {1 - \gamma} \right)\left( {1 - \delta} \right)} \\ {{- \left( {1 - \alpha} \right)}{\gamma\left( {1 - \delta} \right)}} \\ {{- \left( {1 - \alpha} \right)}\left( {1 - \gamma} \right)\delta} \\ {{- \left( {1 - \alpha} \right)}{\gamma\delta}} \\ {{- {\alpha\left( {1 - \gamma} \right)}}\left( {1 - \delta} \right)} \\ {- {{\alpha\gamma}\left( {1 - \delta} \right)}} \\ {{- {\alpha\left( {1 - \gamma} \right)}}\delta} \\ {- {\alpha\gamma\delta}} \\ {\left( {1 - \alpha} \right)\left( {1 - \gamma} \right)\left( {1 - \delta} \right)} \\ {\left( {1 - \alpha} \right){\gamma\left( {1 - \delta} \right)}} \\ {\left( {1 - \alpha} \right)\left( {1 - \gamma} \right)\delta} \\ {\left( {1 - \alpha} \right){\gamma\delta}} \\ {{\alpha\left( {1 - \gamma} \right)}\left( {1 - \delta} \right)} \\ {{\alpha\gamma}\left( {1 - \delta} \right)} \\ {{\alpha\left( {1 - \gamma} \right)}\delta} \\ {\alpha\gamma\delta} \end{bmatrix}},\mspace{14mu}{{\overset{\rightarrow}{g}}_{\beta} = \begin{bmatrix} {\left( {1 - \alpha} \right)\left( {1 - \gamma} \right)\left( {1 - \delta} \right)} \\ {\left( {1 - \alpha} \right){\gamma\left( {1 - \delta} \right)}} \\ {\left( {1 - \alpha} \right)\left( {1 - \gamma} \right)\delta} \\ {\left( {1 - \alpha} \right){\gamma\delta}} \\ {{\alpha\left( {1 - \gamma} \right)}\left( {1 - \delta} \right)} \\ {{\alpha\gamma}\left( {1 - \delta} \right)} \\ {{\alpha\left( {1 - \gamma} \right)}\delta} \\ {\alpha\gamma\delta} \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \end{bmatrix}}$ ${{\overset{\rightarrow}{f}}_{\gamma} = \begin{bmatrix} {{- \left( {1 - \alpha} \right)}\left( {1 - \beta} \right)\left( {1 - \delta} \right)} \\ {\left( {1 - \alpha} \right)\left( {1 - \beta} \right)\left( {1 - \delta} \right)} \\ {{- \left( {1 - \alpha} \right)}\left( {1 - \beta} \right)\delta} \\ {\left( {1 - \alpha} \right)\left( {1 - \beta} \right)\delta} \\ {{- {\alpha\left( {1 - \beta} \right)}}\left( {1 - \delta} \right)} \\ {{\alpha\left( {1 - \beta} \right)}{\gamma\left( {1 - \delta} \right)}} \\ {{- {\alpha\left( {1 - \beta} \right)}}\delta} \\ {{\alpha\left( {1 - \beta} \right)}\delta} \\ {{- \left( {1 - \alpha} \right)}{\beta\left( {1 - \delta} \right)}} \\ {\left( {1 - \alpha} \right){\beta\left( {1 - \delta} \right)}} \\ {{- \left( {1 - \alpha} \right)}{\beta\delta}} \\ {\left( {1 - \alpha} \right){\beta\delta}} \\ {- {{\alpha\beta}\left( {1 - \delta} \right)}} \\ {{\alpha\beta}\left( {1 - \delta} \right)} \\ {- {\alpha\beta\delta}} \\ {\alpha\beta\delta} \end{bmatrix}},\mspace{14mu}{{\overset{\rightarrow}{g}}_{\gamma} = \begin{bmatrix} {\left( {1 - \alpha} \right)\left( {1 - \beta} \right)\left( {1 - \delta} \right)} \\ 0 \\ {\left( {1 - \alpha} \right)\left( {1 - \beta} \right)\delta} \\ 0 \\ {{\alpha\left( {1 - \beta} \right)}\left( {1 - \delta} \right)} \\ 0 \\ {{\alpha\left( {1 - \beta} \right)}\delta} \\ 0 \\ {\left( {1 - \alpha} \right){\beta\left( {1 - \delta} \right)}} \\ 0 \\ {\left( {1 - \alpha} \right){\beta\delta}} \\ 0 \\ {{\alpha\beta}\left( {1 - \delta} \right)} \\ 0 \\ {\alpha\beta\delta} \\ 0 \end{bmatrix}}$ ${{\overset{\rightarrow}{f}}_{\delta} = \begin{bmatrix} {{- \left( {1 - \alpha} \right)}\left( {1 - \beta} \right)\left( {1 - \gamma} \right)} \\ {{- \left( {1 - \alpha} \right)}\left( {1 - \beta} \right)\gamma} \\ {\left( {1 - \alpha} \right)\left( {1 - \beta} \right)\left( {1 - \gamma} \right)} \\ {\left( {1 - \alpha} \right)\left( {1 - \beta} \right)\gamma} \\ {{- {\alpha\left( {1 - \beta} \right)}}\left( {1 - \gamma} \right)} \\ {{- {\alpha\left( {1 - \beta} \right)}}\gamma} \\ {{\alpha\left( {1 - \beta} \right)}\left( {1 - \gamma} \right)} \\ {{\alpha\left( {1 - \beta} \right)}\gamma} \\ {{- \left( {1 - \alpha} \right)}{\beta\left( {1 - \gamma} \right)}} \\ {{- \left( {1 - \alpha} \right)}{\beta\gamma}} \\ {\left( {1 - \alpha} \right){\beta\left( {1 - \gamma} \right)}} \\ {\left( {1 - \alpha} \right){\beta\gamma}} \\ {- {{\alpha\beta}\left( {1 - \gamma} \right)}} \\ {- {\alpha\beta\gamma}} \\ {{\alpha\beta}\left( {1 - \gamma} \right)} \\ {\alpha\beta\gamma} \end{bmatrix}},\mspace{14mu}{{\overset{\rightarrow}{g}}_{\delta} = \begin{bmatrix} {\left( {1 - \alpha} \right)\left( {1 - \beta} \right)\left( {1 - \gamma} \right)} \\ {\left( {1 - \alpha} \right)\left( {1 - \beta} \right)\gamma} \\ 0 \\ 0 \\ {{\alpha\left( {1 - \beta} \right)}\left( {1 - \gamma} \right)} \\ {{\alpha\left( {1 - \beta} \right)}\gamma} \\ 0 \\ 0 \\ {\left( {1 - \alpha} \right){\beta\left( {1 - \gamma} \right)}} \\ {\left( {1 - \alpha} \right){\beta\gamma}} \\ 0 \\ 0 \\ {{\alpha\beta}\left( {1 - \gamma} \right)} \\ {\alpha\beta\gamma} \\ 0 \\ 0 \end{bmatrix}}$

In one embodiment of the invention, the matching function maximization method that finds α, β, γ, and δ is performed by an iterative procedure as shown in FIG. 6.

As shown in FIG. 6, the α, β, γ, and δ values are initialized 600 to initial values. The values could be randomly selected between the valid ranges or could be set to the middle of ranges or to expected values from initial search, etc. Using the initial parameters values, {right arrow over (f)}_(α) and {right arrow over (g)}_(α) are calculated 602. This allows the calculation of the best a value given the α, γ, and δ values 604. The best α value is used along with the initial γ and δ values to calculate the {right arrow over (f)}_(β) and {right arrow over (g)}_(β) values 606. This allows the calculation of the best β value given α, γ, and δ values 608. This process continues to calculate the best γ and δ values, 616, 614, 612, 610. The calculated α, β, γ, and δ values 620 are used to repeat the estimation calculation. This process is iterated until the α, β, γ, and δ values are stable (having little change per iteration) or an exit condition such as the maximum number of iterations is reached. The resulting α, β, γ, and a values are the optimal subpixel and subsampling values.

Those skilled in the art should recognize that other methods of optimization could be applied to determine the optimal subpixel and subsampling values.

When Ψ is the template image and the Φ is the input image, the terms in VAR(Ψ) can be pre-calculated from the template. Only the terms of COV(Ψ,Φ) have to be calculated for each input image regions of interest. This will speed up the invariant high precision match process.

III.3. Robust Matching

The robust matching method described in section II.6 for non-invariant high precision match can be similarly applied for invariant high precision match. The robust matching methods include limiting pixel contribution and pixel weighting.

The invention has been described herein in considerable detail in order to comply with the Patent Statutes and to provide those skilled in the art with the information needed to apply the novel principles and to construct and use such specialized components as are required. However, it is to be understood that the inventions can be carried out by specifically different equipment and devices, and that various modifications, both as to the equipment details and operating procedures, can be accomplished without departing from the scope of the invention itself. 

1. A fast high precision matching method comprising the steps of: a) Input an image; b) Input a template; c) Perform initial search using the input image and the template based on a matching function to create an initial search result output containing only matching function values at discrete (x,y) positions; d) Create high precision matching function by interpolating the matching function values of discrete (x,y) positions making them matching function values of subpixel positions or of invariant high precision parameters; e) Perform high precision match by high precision matching function maximization directly using the matching function values at discrete (x,y) positions from the step (c), the input image, and the same template from step (b) to create a high precision match result output without image matching wherein the high precision match result output around a pixel position (x,y) is the subpixel values α and β and other parameters correspond to the maximum value of the high precision matching function.
 2. The method of claim 1 wherein the matching function maximization for the subpixel values or invariant high precision parameters is performed using optimization methods.
 3. A fast high precision matching method comprising the steps of: a) Input an image; b) Input a template containing pre-calculated template variance parameters; c) Perform initial search using the input image and the template based on a matching function to create an initial search result output containing only matching function values at discrete (x,y) position; d) Create high precision matching function by interpolating the matching function values of discrete (x,y) positions making them matching function values of subpixel positions of invariant high precision parameters; e) Perform high precision match by high precision matching function maximization directly using the matching function values at discrete (x,y) positions from step (c), the input image, and the same template from step (b) to create a high precision match result output without image matching wherein the high precision match result output around a pixel position (x,y) is the subpixel values α and β and other parameters correspond to the maximum value of the high precision matching function.
 4. A fast high precision projection matching method comprising the steps of: a) Input a projection profile; b) Input a template profile; c) Create high precision matching function by interpolating matching function values at discrete (x,y) positions and samples parameters making them matching function values of subpixel positions or of subsampling parameters; d) Perform high precision match by high precision matching function maximization using the projection profile, the same template profile from step (b) to create a high precision projection match result output Perform high precision match by high precision matching function maximization directly using the matching function values at discrete (x,y) positions from step (c), the input image, and the same template from step (b) to create a high precision match result output without image matching wherein the high precision match result output around a pixel position (x,y) is the subpixel values α and β and other parameters correspond to the maximum value of the high precision matching function.
 5. A fast invariant high precision matching method comprising the steps of: a) Input an image; b) Input a template; c) Perform initial search using the input image and the template based on a matching function to create an initial search result output containing only matching function values at discrete (x,y) position; d) Create high precision matching function by interpolating the matching function values of discrete (x,y) positions making them matching function values of subpixel positions or of invariant high precision parameters; e) Perform invariant high precision match by high precision matching function maximization directly using the matching function values at discrete (x,y) positions from step (c), the input image, and the same template from step (b) to create an invariant high precision match result output without image matching wherein the high precision match result output around a pixel position (x,y) is the subpixel values α and β and other parameters correspond to the maximum value of the high precision matching function.
 6. The method of claim 5 wherein interpolating the matching function includes log-converted radial-angular transformation and linear interpolation. 